package com.copm.ifm.servers.sys;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableFeignClients(basePackages = {"com.copm.ifm.servers.insp.client", "com.copm.ifm.servers.org.client"})
@ComponentScan({"com.copm.ifm.base.*", "com.copm.ifm.common.*", "com.copm.ifm.servers.sys.*"})
@SpringBootApplication(scanBasePackages = {"com.copm.ifm.servers.sys"})
@MapperScan({"com.copm.ifm.servers.sys.mapper", "com.copm.ifm.base.service.base.mapper"})
@EnableScheduling
public class SysApplication {

    public static void main(String[] args) {
        SpringApplication.run(SysApplication.class, args);
    }

    @Bean
    public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
        PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
        c.setIgnoreUnresolvablePlaceholders(true);
        return c;
    }

}
